package com.weipai.education.mapper;

import com.weipai.education.model.UserEarnings;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface UserEarningsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserEarnings record);

    int insertSelective(UserEarnings record);

    UserEarnings selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserEarnings record);

    int updateByPrimaryKey(UserEarnings record);

    List<Map<String,Object>> list(@Param("start") Integer start, 
                                  @Param("end") Integer size, 
                                  @Param("type") String type, 
                                  @Param("accountNumber") String accountNumber, 
                                  @Param("startTime") String startTime, 
                                  @Param("endTime") String endTime, 
                                  @Param("userId") String userId);

    Integer listAmount(@Param("type") String type,
                          @Param("accountNumber") String accountNumber,
                          @Param("startTime") String startTime,
                          @Param("endTime") String endTime,
                          @Param("userId") String userId);

    BigDecimal getAllRewardPrice(@Param("month") String month, @Param("userId") String userId,@Param("type") Integer type);

    BigDecimal getDifferentRewardPrice(@Param("type") List<Integer> type, @Param("userId") String userId);
}